package com.yuyu.shop.infrastructure.persistence.convert;

import cn.hutool.core.bean.BeanUtil;
import com.yuyu.shop.domain.user.DO.UserInfoDO;
import com.yuyu.shop.infrastructure.persistence.po.UserPO;

import java.util.Objects;

/**
 * @author
 * @version 1.0
 * @description: TODO
 * @date 2022/8/4 17:36
 */
public class UserPoConvert {

    public static UserInfoDO PO2DO(UserPO po){
        if (Objects.nonNull(po)){
            UserInfoDO userInfoDO = new UserInfoDO();
            BeanUtil.copyProperties(po,userInfoDO);
            return userInfoDO;
        }
        return null;
    }
}
